package com.greensam.pixelengine.facade;

import com.greensam.pixelengine.pojo.base.DeleteRequest;
import com.greensam.pixelengine.pojo.vo.role.request.RoleSaveRequest;
import com.greensam.pixelengine.pojo.vo.role.request.UserRoleSaveRequest;
import com.greensam.pixelengine.pojo.entity.RolePo;
import com.greensam.pixelengine.pojo.vo.role.response.RolePermissionVo;
import com.greensam.pixelengine.pojo.vo.role.response.RoleVo;
import jakarta.validation.Valid;

import java.util.List;

/**
 * 角色门面服务
 *
 * @author Macro_Ray
 * @since 2025/6/19 14:59
 */
public interface RoleFacadeService {

    Boolean saveRole(@Valid RoleSaveRequest request, Long userId);

    Boolean saveUserRole(@Valid UserRoleSaveRequest request, Long userId);

    List<RolePo> listRoleByUserId(Long userId);

    List<RoleVo> listRole();

    /**
     * 删除角色
     *
     * @param request 请求
     * @param userId  用户id
     * @author Macro_Ray
     * @since 2025/9/12
     */
    Boolean deleteRole(@Valid DeleteRequest request, Long userId);

    /**
     * 获取当前用户的权限列表
     *
     * @param userId 用户id
     * @author Ma Chengrui
     * @since 2025/9/30
     */
    List<RolePermissionVo> listUserPermission(Long userId);
}
